<template>
  <view class="flex_row_center_center content">
    <view class="center">
      <view>登陆注册中转</view>
    </view>
  </view>
</template>

<script>
// #ifdef H5
import wechatConfig from '@/utils/jweixin'
import { getQueryVariable, getSessionStore } from '@/utils/common.js'
// #endif
export default {
  name: 'LoginPreIndex',
  data() {
    return {
      
    }
  },
  onLoad() {
    // #ifdef H5
    if (getApp().globalData.isWeixinConfig && getApp().globalData.isWeixinBrowser) {
      const sessionOpenId = getSessionStore('sessionOpenId')
      const code = getQueryVariable('code')
      if (!sessionOpenId && !code) {
        wechatConfig.weixinAuthInitLogin()
      } else {
        this.jumpToLogin()
      }
    } else {
      this.jumpToLogin()
    }
    // #endif

    // #ifdef MP-WEIXIN
    this.jumpToLogin()
    // #endif
  },
  methods: {
    jumpToLogin() {
      uni.redirectTo({
        url: '/pages/main/pages/login/index',
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.content{
  width: 100%;
  .center{
    text-align: center;
    image{
      width: 300rpx;
      height: 300rpx;
    }
  }
}
</style>